// let obj = {
//     name:'Tom',
//     age:18
// }

// let {name: foo,age:bar} = obj
// console.log(foo,bar)

// // 当定义的value与对象的键同名时,直接写键名
// let {name,age} = ogj
// console.log(name,age)

let obj = {
    name:'Tom',
    age:18,
    like:[
        'coding',
        {x:'eat'}
    ]
}
// 层层解剖
let {name,like:[,{x}]} = obj
console.log(name,x)

